<%--
  Created by IntelliJ IDEA.
  User: dujiajia
  Date: 2021/1/17
  Time: 17:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>$Title$</title>
    <script src="${pageContext.request.contextPath}/static/js/jquery.js"></script>
    <script>
        function a() {
            $.ajax({
                url: "${pageContext.request.contextPath}/a1",
                data: {"name": $("#username").val()},
                success: (data) => {
                    alert(data)
                },
                error: (err) => {
                    console.log(err)
                }
            })
        }

    </script>
</head>
<body>
<form>
    <input type="text" id="username" onblur="a()">
</form>
</body>
</html>
